function loadMdField(idCanvas) {

	var F_Font1 = 'bold oblique 16px "Meiryo", "MS PGothic", "ヒラギノ角ゴ Pro W3", "Osaka", "Verdana", "arial", "sans-serif"';
	var F_Font2 = 'bold 48px "ＭＳ Ｐ明朝", "MS PGothic", "Meiryo", "ヒラギノ角ゴ Pro W3", "Osaka", "Verdana", "arial", "sans-serif"';
	var F_Font3 = 'bold 40px "Meiryo", "ヒラギノ角ゴ Pro W3", "Osaka", "Verdana", "arial", "sans-serif"';
	var F_Font4 = 'bold 14px  "Meiryo", "MS PGothic", "ヒラギノ角ゴ Pro W3", "Osaka", "Verdana", "arial", "sans-serif"';

	var FontKnj1 = 'bold 18px "ＭＳ Ｐ明朝", "MS PGothic", "Meiryo", "ヒラギノ角ゴ Pro W3", "Osaka", "Verdana", "arial", "sans-serif"';
	var FontKnj2 = 'bold 28px "ＭＳ Ｐ明朝", "MS PGothic", "Meiryo", "ヒラギノ角ゴ Pro W3", "Osaka", "Verdana", "arial", "sans-serif"';
	var FontKnj3 = 'bold 38px "ＭＳ Ｐ明朝", "MS PGothic", "Meiryo", "ヒラギノ角ゴ Pro W3", "Osaka", "Verdana", "arial", "sans-serif"';
	var FontDmg = 'bold 36px "Meiryo", "ヒラギノ角ゴ Pro W3", "Osaka", "Verdana", "arial", "sans-serif"';
	var FontRtn = 'bold 28px  "Meiryo", "MS PGothic", "ヒラギノ角ゴ Pro W3", "Osaka", "Verdana", "arial", "sans-serif"';
	var FontLB1 = 'bold 14px  "Meiryo", "MS PGothic", "ヒラギノ角ゴ Pro W3", "Osaka", "Verdana", "arial", "sans-serif"';

	var KJTxt01 = enemyKanji01;
	var KJTxt02 = enemyKanji02;
	var KJTxt03 = enemyKanji03;
	var KJTxt04 = playerKanji01;
	var KJTxt05 = playerKanji02;
	var KJTxt06 = playerKanji03;
	var F_SchoolTxt = '';
	var F_SexTxt = '';
	var F_TypeTxt = '';
	var F_KanjiTypeTxt = '';

	imageLoadCnt = 0;
	enableSw = true;

//	jc.start(idCanvas, true);
//	jc.canvas(idCanvas).clear();

	// 背景色の変更
	document.getElementById('canvas_area').style.backgroundColor = '#003300';

	// タイトルの変更
	document.getElementById("headerText").innerHTML = "<b>対戦場</b>";

	// 敵選手名の描画
	jc.rect(0, 0, 115, 20, 'rgba(255,0,0,1.0)', 1).id("F_bar01");
	jc.text(enemyName, 60, 15, 'rgb(255,255,255)').font(F_Font1).align('center').id("F_EName");

	// 選手見出し枠の描画
	jc.rect(115, 0, 60, 20, 'rgba(255,255,255,1.0)', 1).id("F_Label1");
	jc.text('選手名', 145, 15, 'rgb(0,0,0)').font(F_Font1).align('center').id("F_text1");

	// 自選手名の描画
	jc.rect(175, 0, 115, 20, 'rgba(0,0,255,1.0)', 1).id("F_bar02");
	jc.text(playerName, 230, 15, 'rgb(255,255,255)').font(F_Font1).align('center').id("F_PName");

	// 敵選手体力数値の描画
	jc.rect(0, 20, 115, 20, 'rgba(255,0,0,1.0)', 1).id("F_bar03");
	jc.text(enemyBarPoint, 60, 35, 'rgb(255,255,255)').font(F_Font1).align('center').id("F_EP");

	// 体力見出し枠の描画
	jc.rect(115, 20, 60, 20, 'rgba(255,255,255,1.0)', 1).id("F_Label2");
	jc.text('体力', 145, 35, 'rgb(0,0,0)').font(F_Font1).align('center').id("F_text2");

	// 自選手体力数値の描画
	jc.rect(175, 20, 115, 20, 'rgba(0,0,255,1.0)', 1).id("F_bar04");
	jc.text(playerBarPoint, 230, 35, 'rgb(255,255,255)').font(F_Font1).align('center').id("F_PP");

	// 敵選手の描画
	var imgEne = new Image();
	imgEne.src = '/static/image/mdkbr/' + enemyCG;
	imgEne.onload = function() {
		jc.image(imgEne, 0, 40, 145, 280, 50, 0, 200, 400).id("Ene1D").layer('F_L_Ene1');
	}

	// 自選手の描画
	var imgPly = new Image();
	imgPly.src = '/static/image/mdkbr/' + playerCG;
	imgPly.onload = function() {
		jc.image(imgPly, 145, 40, 145, 280, 50, 0, 200, 400).id("Ply1D").layer('F_L_Ply1');
		jc.image(imgPly, 145, 40, 145, 280, 50, 0, 200, 400).id("Ply1D").layer('F_L_20');
	}

	// 中心線の描画
	jc.line([ [ 145, 40 ], [ 145, 320 ] ], 'rgba(255,255,255,1)', 0).lineStyle({
		lineWidth : 5
	}).layer('F_L_Field');

	// fieldの描画
	jc.line([ [ 25, 280 ], [ 100, 190 ], [ 190, 190 ], [ 265, 280 ], [ 25, 280 ] ], 'rgba(130,130,130,1)', 1).layer('F_L_Field');
	jc.line([ [ 25, 280 ], [ 100, 190 ], [ 190, 190 ], [ 265, 280 ], [ 25, 280 ] ], 'rgba(0,0,0,1)', 0).layer('F_L_Field');
	jc.line([ [ 145, 190 ], [ 145, 280 ] ], 'rgba(0,0,0,1)', 0).layer('F_L_Field');
	jc.line([ [ 115, 190 ], [ 65, 280 ] ], 'rgba(0,0,0,1)', 0).layer('F_L_Field');
	jc.line([ [ 130, 190 ], [ 105, 280 ] ], 'rgba(0,0,0,1)', 0).layer('F_L_Field');
	jc.line([ [ 160, 190 ], [ 185, 280 ] ], 'rgba(0,0,0,1)', 0).layer('F_L_Field');
	jc.line([ [ 175, 190 ], [ 225, 280 ] ], 'rgba(0,0,0,1)', 0).layer('F_L_Field');
	jc.line([ [ 80, 215 ], [ 210, 215 ] ], 'rgba(0,0,0,1)', 0).layer('F_L_Field');
	jc.line([ [ 55, 245 ], [ 235, 245 ] ], 'rgba(0,0,0,1)', 0).layer('F_L_Field');
	jc.line([ [ 25, 280 ], [ 25, 300 ], [ 265, 300 ], [ 265, 280 ], [ 25, 280 ] ], 'rgba(40,40,40,1)', 1).layer('F_L_Field');
	jc.line([ [ 25, 280 ], [ 25, 300 ], [ 265, 300 ], [ 265, 280 ], [ 25, 280 ] ], 'rgba(0,0,0,1)', 0).layer('F_L_Field');
	// 下線の描画
	jc.line([ [ 0, 320 ], [ 290, 320 ] ], 'rgba(0,0,0,1)', 0).lineStyle({
		lineWidth : 5
	}).layer('F_L_Field');

	// 敵軍漢字枠の描画１
	jc.circle(119, 186, 13, 'rgba(255,255,100)', 1).shadow({
		x : -2,
		y : 2,
		color : '#000000'
	}).id("kanji01").layer('F_L_E1');

	// 敵軍漢字の描画１
	jc.text(KJTxt01, 110, 192).id("kanjiText01").font(FontKnj1).layer('F_L_E1');

	// 敵軍漢字枠の描画２
	jc.circle(105, 217, 19, 'rgba(255,255,100)', 1).shadow({
		x : -2,
		y : 2,
		color : '#000000'
	}).id("kanji02").layer('F_L_E2');

	// 敵軍漢字の描画２
	jc.text(KJTxt02, 90, 227).id("kanjiText02").font(FontKnj2).layer('F_L_E2');

	// 敵軍漢字枠の描画３
	jc.circle(84, 256, 23, 'rgba(255,255,100)', 1).shadow({
		x : -2,
		y : 2,
		color : '#000000'
	}).id("kanji03").layer('F_L_E3');

	// 敵軍漢字の描画３
	jc.text(KJTxt03, 65, 270).font(FontKnj3).id("kanjiText03").layer('F_L_E3');

	// 自軍漢字枠の描画１
	jc.circle(170, 186, 13, 'rgba(255,255,100)', 1).shadow({
		x : 2,
		y : 2,
		color : '#000000'
	}).id("kanji04").layer('F_L_P1');

	// 自軍漢字の描画１
	jc.text(KJTxt04, 161, 192).font(FontKnj1).id("kanjiText04").layer('F_L_P1');

	// 自軍漢字枠の描画２
	jc.circle(185, 217, 19, 'rgba(255,255,100)', 1).shadow({
		x : 3,
		y : 3,
		color : '#000000'
	}).id("kanji05").layer('F_L_P2');

	// 自軍漢字の描画２
	jc.text(KJTxt05, 171, 227).font(FontKnj2).id("kanjiText05").layer('F_L_P2');

	// 自軍漢字枠の描画３
	jc.circle(205, 256, 23, 'rgba(255,255,100)', 1).shadow({
		x : 3,
		y : 3,
		color : '#000000'
	}).id("kanji06").layer('F_L_P3');

	// 自軍漢字の描画３
	jc.text(KJTxt06, 185, 270).font(FontKnj3).id("kanjiText06").layer('F_L_P3');

	// 確認ボタン
	jc.rect(10, 330, 120, 30, 'rgba(102, 255, 51)', 1).shadow({
		x : 5,
		y : 5,
		color : '#000000'
	}).id("F_Btn_Confirm").mouseover(function() {
		jc('#F_L_Confirm').color('#ffff00');
	}).mouseout(function() {
		jc('#F_L_Confirm').color('rgb(0,0,0)');
	}).click(function() {
		if(enableSw == true){
			enableSw = false;
			jc.layer('F_L_20').objects().visible(true);
			jc.layer('F_L_20').level('top');
		}
	}).layer('F_L_BtnC');

	jc.text("確　認", 70, 355, 'rgb(0,0,0)').id('F_L_Confirm').layer('F_L_BtnC').font(FontRtn).align('center');

	jc.layer('F_L_BtnC').objects().mouseover(function() {
		jc('#F_L_Confirm').color('#ffff00');
	}).mouseout(function() {
		jc('#F_L_Confirm').color('rgb(0,0,0)');
	});

	// 対戦開始ボタン
	jc.rect(160, 330, 120, 30, 'rgba(255,255,255)', 1).shadow({
		x : 5,
		y : 5,
		color : '#000000'
	}).id("F_Btn_Attack").mouseover(function() {
		jc('#F_L_Attack').color('#ffff00');
	}).mouseout(function() {
		jc('#F_L_Attack').color('rgb(0,0,0)');
	}).click(function() {
		if(enableSw == true){
			enableSw = false;
			jc.layer('L_FD').objects().opacity(0);
			jc('#F_L_Attack').color('#ffff00');
			jc.layer('F_L_Disp').objects().visible(true);
			jc.layer('F_L_Disp1').objects().visible(true);
			jc.layer('F_L_Disp2').objects().visible(true);
			jc.layer('F_L_Disp3').objects().visible(true);
			jc.layer('F_L_Disp4').objects().visible(true);
			jc.layer('F_L_Disp5').objects().visible(true);
			jc.layer('F_L_DispA').objects().visible(true);
		}
	}).layer('F_L_BtnA');

	jc.text("対戦開始", 220, 355, 'rgb(0,0,0)').id('F_L_Attack').layer('F_L_BtnA').font(FontRtn).align('center');

	jc.layer('F_L_BtnA').objects().mouseover(function() {
		jc('#F_L_Attack').color('#ffff00');
	}).mouseout(function() {
		jc('#F_L_Attack').color('rgb(0,0,0)');
	});

	// 対戦方法パネル描画
	jc.rect(10, 60, 270, 250, 'rgba(255,255,255,0.8)', 1).id('F_Disp').layer('F_L_Disp');
	jc.text("対戦に使用する属性を選んで下さい", 20, 80, 240, 'rgb(0,0,0)').id('F_Dt1').font(F_Font1).opacity(1).layer('F_L_Disp');

	jc.circle(145, 120, 30, 'rgba(0,255,0)', 1).id("F_Frm1").layer('F_L_Disp1');
	jc.text("木", 145, 135, 'rgb(0,0,0)').id('F_Frm1t').font(F_Font2).align('center').opacity(1).layer('F_L_Disp1');
	jc.circle(145, 120, 30, 'rgba(0,255,0)', 1).opacity(0).mouseover(function() {
		jc('#F_Frm1t').color('rgb(255,255,255)');
	}).mouseout(function() {
		jc('#F_Frm1t').color('rgb(0,0,0)');
	}).click(function() {
		jc.layer('F_L_Disp').objects().visible(false);
		jc.layer('F_L_Disp1').objects().visible(false);
		jc.layer('F_L_Disp2').objects().visible(false);
		jc.layer('F_L_Disp3').objects().visible(false);
		jc.layer('F_L_Disp4').objects().visible(false);
		jc.layer('F_L_Disp5').objects().visible(false);
		jc.layer('F_L_DispA').objects().visible(false);
		attackStart(idCanvas, 'PF-KI');
	}).id("F_Frm1h").layer('F_L_Disp1');

	jc.circle(240, 180, 30, 'rgba(255,0,0)', 1).id("F_Frm2").layer('F_L_Disp2');
	jc.text("火", 240, 195, 'rgb(0,0,0)').id('F_Frm2t').font(F_Font2).align('center').opacity(1).layer('F_L_Disp2');
	jc.circle(240, 180, 30, 'rgba(0,255,0)', 1).opacity(0).mouseover(function() {
		jc('#F_Frm2t').color('rgb(255,255,255)');
	}).mouseout(function() {
		jc('#F_Frm2t').color('rgb(0,0,0)');
	}).click(function() {
		jc.layer('F_L_Disp').objects().visible(false);
		jc.layer('F_L_Disp1').objects().visible(false);
		jc.layer('F_L_Disp2').objects().visible(false);
		jc.layer('F_L_Disp3').objects().visible(false);
		jc.layer('F_L_Disp4').objects().visible(false);
		jc.layer('F_L_Disp5').objects().visible(false);
		jc.layer('F_L_DispA').objects().visible(false);
		attackStart(idCanvas, 'PF-HI');
	}).id("F_Frm2h").layer('F_L_Disp2');

	jc.circle(195, 270, 30, 'rgba(204,102,0)', 1).id("F_Frm3").layer('F_L_Disp3');
	jc.text("土", 195, 285, 'rgb(0,0,0)').id('F_Frm3t').font(F_Font2).align('center').opacity(1).layer('F_L_Disp3');
	jc.circle(195, 270, 30, 'rgba(0,255,0)', 1).opacity(0).mouseover(function() {
		jc('#F_Frm3t').color('rgb(255,255,255)');
	}).mouseout(function() {
		jc('#F_Frm3t').color('rgb(0,0,0)');
	}).click(function() {
		jc.layer('F_L_Disp').objects().visible(false);
		jc.layer('F_L_Disp1').objects().visible(false);
		jc.layer('F_L_Disp2').objects().visible(false);
		jc.layer('F_L_Disp3').objects().visible(false);
		jc.layer('F_L_Disp4').objects().visible(false);
		jc.layer('F_L_Disp5').objects().visible(false);
		jc.layer('F_L_DispA').objects().visible(false);
		attackStart(idCanvas, 'PF-DO');
	}).id("F_Frm3h").layer('F_L_Disp3');

	jc.circle(95, 270, 30, 'rgba(255,255,0)', 1).id("F_Frm4").layer('F_L_Disp4');
	jc.text("金", 95, 285, 'rgb(0,0,0)').id('F_Frm4t').font(F_Font2).align('center').opacity(1).layer('F_L_Disp4');
	jc.circle(95, 270, 30, 'rgba(0,255,0)', 1).opacity(0).mouseover(function() {
		jc('#F_Frm4t').color('rgb(255,255,255)');
	}).mouseout(function() {
		jc('#F_Frm4t').color('rgb(0,0,0)');
	}).click(function() {
		jc.layer('F_L_Disp').objects().visible(false);
		jc.layer('F_L_Disp1').objects().visible(false);
		jc.layer('F_L_Disp2').objects().visible(false);
		jc.layer('F_L_Disp3').objects().visible(false);
		jc.layer('F_L_Disp4').objects().visible(false);
		jc.layer('F_L_Disp5').objects().visible(false);
		jc.layer('F_L_DispA').objects().visible(false);
		attackStart(idCanvas, 'PF-KIN');
	}).id("F_Frm4h").layer('F_L_Disp4');

	jc.circle(50, 180, 30, 'rgba(51,51,255)', 1).id("F_Frm5").layer('F_L_Disp5');
	jc.text("水", 50, 195, 'rgb(0,0,0)').id('F_Frm5t').font(F_Font2).align('center').opacity(1).layer('F_L_Disp5');
	jc.circle(50, 180, 30, 'rgba(0,255,0)', 1).opacity(0).mouseover(function() {
		jc('#F_Frm5t').color('rgb(255,255,255)');
	}).mouseout(function() {
		jc('#F_Frm5t').color('rgb(0,0,0)');
	}).click(function() {
		jc.layer('F_L_Disp').objects().visible(false);
		jc.layer('F_L_Disp1').objects().visible(false);
		jc.layer('F_L_Disp2').objects().visible(false);
		jc.layer('F_L_Disp3').objects().visible(false);
		jc.layer('F_L_Disp4').objects().visible(false);
		jc.layer('F_L_Disp5').objects().visible(false);
		jc.layer('F_L_DispA').objects().visible(false);
		attackStart(idCanvas, 'PF-SUI');
	}).id("F_Frm5h").layer('F_L_Disp5');

	jc.line([[193,128],[208,158],[178,148]],'rgba(255,0,0,1)',1).layer('F_L_DispA');
	jc.line([[220,210],[240,220],[215,240]],'rgba(204,102,0,1)',1).layer('F_L_DispA');
	jc.line([[130,270],[155,260],[155,280]],'rgba(255,255,0,1)',1).layer('F_L_DispA');
	jc.line([[62,215],[85,235],[64,245]],'rgba(51,51,255,1)',1).layer('F_L_DispA');
	jc.line([[78,140],[110,135],[90,160]],'rgba(0,255,0,1)',1).layer('F_L_DispA');

	jc.line([[85,176],[200,176],[205,181],[200,186],[85,186]],'rgba(0,0,0,1)',1).layer('F_L_DispA');
	jc.line([[155,155],[163,151],[194,231],[191,238],[184,234]],'rgba(0,0,0,1)',1).layer('F_L_DispA');
	jc.line([[205,192],[210,200],[128,250],[121,247],[123,240]],'rgba(0,0,0,1)',1).layer('F_L_DispA');
	jc.line([[173,240],[168,248],[84,203],[83,197],[89,194]],'rgba(0,0,0,1)',1).layer('F_L_DispA');
	jc.line([[100,235],[110,238],[135,158],[131,153],[125,156]],'rgba(0,0,0,1)',1).layer('F_L_DispA');

	jc.layer('F_L_Disp').objects().visible(false);
	jc.layer('F_L_Disp1').objects().visible(false);
	jc.layer('F_L_Disp2').objects().visible(false);
	jc.layer('F_L_Disp3').objects().visible(false);
	jc.layer('F_L_Disp4').objects().visible(false);
	jc.layer('F_L_Disp5').objects().visible(false);
	jc.layer('F_L_DispA').objects().visible(false);

	// 戻るボタン
	jc.rect(85, 380, 120, 30, 'rgba(256,153,0)', 1).shadow({
		x : 5,
		y : 5,
		color : '#000000'
	}).mouseover(function() {
		jc('#rtnMenu').color('#ffff00');
	}).mouseout(function() {
		jc('#rtnMenu').color('rgb(0,0,0)');
	}).click(function() {
		if(jc('#Confirm_B').visible() == false){
			// 背景色の変更
			document.getElementById('canvas_area').style.backgroundColor = '#222222';
			jc.canvas(idCanvas).clear();
			if (firstLogin == '3'){
				firstLogin = '4';
				loadMdMenu(idCanvas);
			} else {
				if(fieldType == '1' || fieldType == '2' || fieldType == '3'){
					var FD_3d = new Date();
					$.getJSON('../main/mdFieldStart' + '?_=' + FD_3d.getMilliseconds(), {
						userId : userId,
						eneId : '',
						eneLv : '',
						idCanvas : idCanvas
					}, callbackSchoolTrnmnt, 'json');
				} else {
					var FD_4d = new Date();
					$.getJSON('../main/mdEnemySelect' + '?_=' + FD_4d.getMilliseconds(), {
						userId : userId,
						idCanvas : idCanvas
					}, callbackRansen, "json");
				}
			}
		} else {
			jc.layer('F_L_20').objects().visible(false);
		}
		enableSw = true;
	}).id("Btn_Return");

	// メニューへ戻る
	jc.text("戻　る", 145, 405, 'rgb(0,0,0)').id('rtnMenu').font(FontRtn).align('center').mouseover(function() {
		this.color('#ffff00');
	}).mouseout(function() {
		this.color('rgb(0,0,0)');
	});

	// ラベル「敵軍ダメージ」の描画
	jc.text("", 70, 120, 'rgb(255,255,255)').font(FontDmg).align('center').opacity(0).shadow({
		x : 5,
		y : 5,
		color : '#000000'
	}).id("labelEDmg").layer('F_L_8');

	// ラベル「自軍ダメージ」の描画
	jc.text("", 210, 120, 'rgb(255,255,255)').font(FontDmg).align('center').opacity(0).shadow({
		x : 5,
		y : 5,
		color : '#000000'
	}).id("labelPDmg").layer('F_L_8');

	// 属性の描画
	var imgSUI = new Image();
	imgSUI.src = '../../static/image/effect/frm_sui.png';
	imgSUI.onload = function() {
		jc.image(imgSUI, -20, 160).opacity(0).id("BEFSuiE").layer('F_L_11');
		jc.image(imgSUI, 185, 160).opacity(0).id("BEFSuiP").layer('F_L_11');
		imageLoadCnt++;
		var imgKI = new Image();
		imgKI.src = '../../static/image/effect/frm_ki.png';
		imgKI.onload = function() {
			jc.image(imgKI, -20, 160).opacity(0).id("BEFKiE").layer('F_L_11');
			jc.image(imgKI, 185, 160).opacity(0).id("BEFKiP").layer('F_L_11');
			imageLoadCnt++;
			var imgHI = new Image();
			imgHI.src = '../../static/image/effect/frm_hi.png';
			imgHI.onload = function() {
				jc.image(imgHI, -10, 167).opacity(0).id("BEFHiE").layer('F_L_11');
				jc.image(imgHI, 195, 167).opacity(0).id("BEFHiP").layer('F_L_11');
				imageLoadCnt++;
				var imgKIN = new Image();
				imgKIN.src = '../../static/image/effect/frm_kin.png';
				imgKIN.onload = function() {
					jc.image(imgKIN, -20, 160).opacity(0).id("BEFKinE").layer('F_L_11');
					jc.image(imgKIN, 185, 160).opacity(0).id("BEFKinP").layer('F_L_11');
					imageLoadCnt++;
					var imgDO = new Image();
					imgDO.src = '../../static/image/effect/frm_do.png';
					imgDO.onload = function() {
						jc.image(imgDO, -20, 160).opacity(0).id("BEFDoE").layer('F_L_11');
						jc.image(imgDO, 185, 160).opacity(0).id("BEFDoP").layer('F_L_11');
						imageLoadCnt++;

						// 戦闘エフェクトの描画
						jc.line([[145,200],[150,211],[162,206],[155,217],[168,222],[155,227],[162,238],[150,232],[145,245],[140,232],[128,238],[135,227],[122,222],[135,217],[128,206],[140,211]], 'rgba(255,255,0,0.8)', 1).id("BEfect01").layer('F_L_E7');
						jc('#BEfect01').transform(2,0,0,2,-45,-205).visible(false);

						jc.line([[145,200],[150,211],[162,206],[155,217],[168,222],[155,227],[162,238],[150,232],[145,245],[140,232],[128,238],[135,227],[122,222],[135,217],[128,206],[140,211]], 'rgba(255,205,0,0.8)', 1).id("BEfect02").layer('F_L_E7');
						jc('#BEfect02').transform(2,0,0,2,-45,-225).visible(false);

						jc.line([[145,200],[150,211],[162,206],[155,217],[168,222],[155,227],[162,238],[150,232],[145,245],[140,232],[128,238],[135,227],[122,222],[135,217],[128,206],[140,211]], 'rgba(255,135,0,0.8)', 1).id("BEfect03").layer('F_L_E7');
						jc('#BEfect03').transform(2,0,0,2,-45,-245).visible(false);

						jc.line([[145,200],[150,211],[162,206],[155,217],[168,222],[155,227],[162,238],[150,232],[145,245],[140,232],[128,238],[135,227],[122,222],[135,217],[128,206],[140,211]], 'rgba(255,135,0,0.8)', 1).id("BEfect04").layer('F_L_E7');
						jc('#BEfect04').transform(2,0,0,2,-245,-205).visible(false);

						jc.line([[145,200],[150,211],[162,206],[155,217],[168,222],[155,227],[162,238],[150,232],[145,245],[140,232],[128,238],[135,227],[122,222],[135,217],[128,206],[140,211]], 'rgba(255,255,0,0.8)', 1).id("BEfect05").layer('F_L_E7');
						jc('#BEfect05').transform(2,0,0,2,-245,-225).visible(false);

						jc.line([[145,200],[150,211],[162,206],[155,217],[168,222],[155,227],[162,238],[150,232],[145,245],[140,232],[128,238],[135,227],[122,222],[135,217],[128,206],[140,211]], 'rgba(255,205,0,0.8)', 1).id("BEfect06").layer('F_L_E7');
						jc('#BEfect06').transform(2,0,0,2,-245,-245).visible(false);

						// ラベルの描画
						jc.text("BATTLE!", 55, 180, 'rgb(255,0,0)').id("label03").layer('F_L_9');
						jc('#label03').font('bold oblique 42px "Meiryo", "MS PGothic", "ヒラギノ角ゴ Pro W3", "Osaka", "Verdana", "arial", "sans-serif"');
						jc('#label03').shadow({
							x : 5,
							y : 5,
							color : '#000000'
						});
						jc('#label03').visible(false);

						// ラベル「引き分け」の描画
						jc.text("引き分け", 145, 190, 'rgb(255,255,255)').align('center').font(F_Font3).id("labelEven").layer('F_L_10D');
						jc('#labelEven').shadow({
							x : 3,
							y : 3,
							color : '#000000'
						});
						jc('#labelEven').visible(false);
					}
				}
			}
		}
	}

	// 敵勝敗ラベルの描画
	jc.text("勝ち", 70, 80, 'rgb(255,0,0)').font(F_Font3).align('center').shadow({
		x : 3,
		y : 3,
		color : '#000000'
	}).id('labelWinE').layer('F_L_10L');

	jc.text("負け", 70, 80, 'rgb(0,0,255)').font(F_Font3).align('center').shadow({
		x : 3,
		y : 3,
		color : '#000000'
	}).id('labelLoseE').layer('F_L_10W');

	// 自勝敗ラベルの描画
	jc.text("勝ち", 220, 80, 'rgb(255,0,0)').font(F_Font3).align('center').shadow({
		x : 3,
		y : 3,
		color : '#000000'
	}).id('labelWinP').layer('F_L_10W');

	jc.text("負け", 220, 80, 'rgb(0,0,255)').font(F_Font3).align('center').shadow({
		x : 3,
		y : 3,
		color : '#000000'
	}).id('labelLoseP').layer('F_L_10L');

	jc.layer('F_L_10W').objects().visible(false);
	jc.layer('F_L_10L').objects().visible(false);

	jc.layer('F_L_Ene1').level('bottom');
	jc.layer('F_L_Ply1').level('bottom');

	interval_3 = setInterval(function() {
		firstView(idCanvas);
	}, 1);


	if(playerSchool == '001'){
		F_SchoolTxt = 'いなほ学園';
	} else if(playerSchool == '002'){
		F_SchoolTxt = 'かえで学院';
	} else if(playerSchool == '003'){
		F_SchoolTxt = 'あさぎ付属';
	} else if(playerSchool == '004'){
		F_SchoolTxt = 'もえぎ高校';
	}

	if(playerSex == '1'){
		F_SexTxt = '男子';
	} else {
		F_SexTxt = '女子';
	}

	if(playerType == 'KI'){
		F_TypeTxt = '木';
	} else if(playerType == 'HI'){
		F_TypeTxt = '火';
	} else if(playerType == 'KIN'){
		F_TypeTxt = '金';
	} else if(playerType == 'DO'){
		F_TypeTxt = '土';
	} else if(playerType == 'SUI'){
		F_TypeTxt = '水';
	}

	if(PF_S1 == 1){
		F_KanjiTypeTxt = F_KanjiTypeTxt + '木' + '　　';
	} else if (PF_S1 > 1){
		F_KanjiTypeTxt = F_KanjiTypeTxt + '木 x ' + PF_S1 + '　　';
	}
	if(PF_S2 == 1){
		F_KanjiTypeTxt = F_KanjiTypeTxt + '火' + '　　';
	} else if (PF_S2 > 1){
		F_KanjiTypeTxt = F_KanjiTypeTxt + '火 x ' + PF_S2 + '　　';
	}
	if(PF_S3 == 1){
		F_KanjiTypeTxt = F_KanjiTypeTxt + '金' + '　　';
	} else if (PF_S3 > 1){
		F_KanjiTypeTxt = F_KanjiTypeTxt + '金 x ' + PF_S3 + '　　';
	}
	if(PF_S4 == 1){
		F_KanjiTypeTxt = F_KanjiTypeTxt + '土' + '　　';
	} else if (PF_S4 > 1){
		F_KanjiTypeTxt = F_KanjiTypeTxt + '土 x ' + PF_S4 + '　　';
	}
	if(PF_S5 == 1){
		F_KanjiTypeTxt = F_KanjiTypeTxt + '水' + '　　';
	} else if (PF_S5 > 1){
		F_KanjiTypeTxt = F_KanjiTypeTxt + '水 x ' + PF_S5 + '　　';
	}

	jc.rect(0, 0, 290, 370, 'rgba(0,51,0)', 1).id('Confirm_B').layer('F_L_20');
	jc.text("【選手名】", 20, 80, 'rgb(255,255,255)').font(F_Font4).layer('F_L_20');
	jc.text(playerName, 40, 100, 'rgb(255,255,255)').font(F_Font4).layer('F_L_20');
	jc.text("【所属校】", 20, 120, 'rgb(255,255,255)').font(F_Font4).layer('F_L_20');
	jc.text(F_SchoolTxt, 40, 140, 'rgb(255,255,255)').font(F_Font4).layer('F_L_20');
	jc.text("【性別】", 20, 160, 'rgb(255,255,255)').font(F_Font4).layer('F_L_20');
	jc.text(F_SexTxt, 40, 180, 'rgb(255,255,255)').font(F_Font4).layer('F_L_20');
	jc.text("【得意属性】", 20, 200, 'rgb(255,255,255)').font(F_Font4).layer('F_L_20');
	jc.text(F_TypeTxt, 40, 220, 'rgb(255,255,255)').font(F_Font4).layer('F_L_20');
	jc.text("【総体力】", 20, 240, 'rgb(255,255,255)').font(F_Font4).layer('F_L_20');
	jc.text(playerBarPointBefore, 40, 260, 'rgb(255,255,255)').font(F_Font4).layer('F_L_20');
	jc.text("【総攻撃力】", 20, 280, 'rgb(255,255,255)').font(F_Font4).layer('F_L_20');
	jc.text(playerAttackPoint, 40, 300, 'rgb(255,255,255)').font(F_Font4).layer('F_L_20');
	jc.text("【漢字得意属性】", 20, 320, 'rgb(255,255,255)').font(F_Font4).layer('F_L_20');
	jc.text(F_KanjiTypeTxt, 40, 340, 'rgb(255,255,255)').id('R_RLCount').font(F_Font4).layer('F_L_20');

	jc.layer('F_L_20').objects().visible(false);

	jc.start(idCanvas, true);
}

function attackStart(idCanvas, inPF) {

	var EF_PATTERN = '';
	var PF_PATTERN = '';

	var EF_ATNum = 1;
	var PF_ATNum = 1;

	AT_START = 'START';

	battleResult = '';

	PF_PATTERN = inPF;

	var EF_RandomPT = (Math.round(Math.random() * 20 + 0.5) * 0.01) + 1;
	var PF_RandomPT = (Math.round(Math.random() * 20 + 0.5) * 0.01) + 1;

	var EF_PATTERN_SEL = Math.round(Math.random() * 5 + 0.5);
	switch (EF_PATTERN_SEL) {
	case 1:
		EF_PATTERN = 'EF-KI';
		break;
	case 2:
		EF_PATTERN = 'EF-HI';
		break;
	case 3:
		EF_PATTERN = 'EF-KIN';
		break;
	case 4:
		EF_PATTERN = 'EF-DO';
		break;
	case 5:
		EF_PATTERN = 'EF-SUI';
		break;
	default:
		EF_PATTERN = 'EF-KI';
	}

	var EF_END = '';
	var PF_END = '';
	var AT_END = '';
	var EK_COLOR = 'rgba(255,255,100)';
	var PK_COLOR = 'rgba(255,255,100)';
	var EK_TYPE = '';
	var PK_TYPE = '';

	// 敵軍属性Anime
	if (EF_PATTERN == 'EF-KI') {
		EK_COLOR = 'rgba(0,255,0)';
		EK_TYPE = '#BEFKiE';
	} else if (EF_PATTERN == 'EF-HI') {
		EK_COLOR = 'rgba(255,0,0)';
		EK_TYPE = '#BEFHiE';
	} else if (EF_PATTERN == 'EF-KIN') {
		EK_COLOR = 'rgba(255,255,0)';
		EK_TYPE = '#BEFKinE';
	} else if (EF_PATTERN == 'EF-DO') {
		EK_COLOR = 'rgba(204,102,0)';
		EK_TYPE = '#BEFDoE';
	} else if (EF_PATTERN == 'EF-SUI') {
		EK_COLOR = 'rgba(51,51,255)';
		EK_TYPE = '#BEFSuiE';
	} else {
		EK_COLOR = 'rgba(255,255,100)';
		EK_TYPE = '#BEFKiE';
	}

	// 自軍属性Anime
	if (PF_PATTERN == 'PF-KI') {
		PK_COLOR = 'rgba(0,255,0)';
		PK_TYPE = '#BEFKiP';
	} else if (PF_PATTERN == 'PF-HI') {
		PK_COLOR = 'rgba(255,0,0)';
		PK_TYPE = '#BEFHiP';
	} else if (PF_PATTERN == 'PF-KIN') {
		PK_COLOR = 'rgba(255,255,0)';
		PK_TYPE = '#BEFKinP';
	} else if (PF_PATTERN == 'PF-DO') {
		PK_COLOR = 'rgba(204,102,0)';
		PK_TYPE = '#BEFDoP';
	} else if (PF_PATTERN == 'PF-SUI') {
		PK_COLOR = 'rgba(51,51,255)';
		PK_TYPE = '#BEFSuiP';
	} else {
		PK_COLOR = 'rgba(255,255,100)';
		PK_TYPE = '#BEFKiP';
	}

	if (EF_PATTERN == 'EF-KI' && PF_PATTERN == 'PF-KI') {
		EF_ATNum = 1;
		PF_ATNum = 1;
	} else if (EF_PATTERN == 'EF-HI' && PF_PATTERN == 'PF-KI') {
		EF_ATNum = 0.25;
		PF_ATNum = -0.5;
	} else if (EF_PATTERN == 'EF-DO' && PF_PATTERN == 'PF-KI') {
		EF_ATNum = 1;
		PF_ATNum = 1.25 + (0.5 * PF_S1);
	} else if (EF_PATTERN == 'EF-KIN' && PF_PATTERN == 'PF-KI') {
		EF_ATNum = 1.25 + (0.5 * EF_S3);
		PF_ATNum = 1;
	} else if (EF_PATTERN == 'EF-SUI' && PF_PATTERN == 'PF-KI') {
		EF_ATNum = -0.5;
		PF_ATNum = 0.25;
	} else if (EF_PATTERN == 'EF-KI' && PF_PATTERN == 'PF-HI') {
		EF_ATNum = -0.5;
		PF_ATNum = 0.25;
	} else if (EF_PATTERN == 'EF-HI' && PF_PATTERN == 'PF-HI') {
		EF_ATNum = 1;
		PF_ATNum = 1;
	} else if (EF_PATTERN == 'EF-DO' && PF_PATTERN == 'PF-HI') {
		EF_ATNum = 0.25;
		PF_ATNum = -0.5;
	} else if (EF_PATTERN == 'EF-KIN' && PF_PATTERN == 'PF-HI') {
		EF_ATNum = 1;
		PF_ATNum = 1.25 + (0.5 * PF_S2);
	} else if (EF_PATTERN == 'EF-SUI' && PF_PATTERN == 'PF-HI') {
		EF_ATNum = 1.25 + (0.5 * EF_S5);
		PF_ATNum = 1;
	} else if (EF_PATTERN == 'EF-KI' && PF_PATTERN == 'PF-DO') {
		EF_ATNum = 1.25 + (0.5 * EF_S1);
		PF_ATNum = 1;
	} else if (EF_PATTERN == 'EF-HI' && PF_PATTERN == 'PF-DO') {
		EF_ATNum = -0.5;
		PF_ATNum = 0.25;
	} else if (EF_PATTERN == 'EF-DO' && PF_PATTERN == 'PF-DO') {
		EF_ATNum = 1;
		PF_ATNum = 1;
	} else if (EF_PATTERN == 'EF-KIN' && PF_PATTERN == 'PF-DO') {
		EF_ATNum = 0.25;
		PF_ATNum = -0.5;
	} else if (EF_PATTERN == 'EF-SUI' && PF_PATTERN == 'PF-DO') {
		EF_ATNum = 1;
		PF_ATNum = 1.25 + (0.5 * PF_S4);
	} else if (EF_PATTERN == 'EF-KI' && PF_PATTERN == 'PF-KIN') {
		EF_ATNum = 1;
		PF_ATNum = 1.25 + (0.5 * PF_S3);
	} else if (EF_PATTERN == 'EF-HI' && PF_PATTERN == 'PF-KIN') {
		EF_ATNum = 1.25 + (0.5 * EF_S2);
		PF_ATNum = 1;
	} else if (EF_PATTERN == 'EF-DO' && PF_PATTERN == 'PF-KIN') {
		EF_ATNum = -0.5;
		PF_ATNum = 0.25;
	} else if (EF_PATTERN == 'EF-KIN' && PF_PATTERN == 'PF-KIN') {
		EF_ATNum = 1;
		PF_ATNum = 1;
	} else if (EF_PATTERN == 'EF-SUI' && PF_PATTERN == 'PF-KIN') {
		EF_ATNum = 0.25;
		PF_ATNum = -0.5
	} else if (EF_PATTERN == 'EF-KI' && PF_PATTERN == 'PF-SUI') {
		EF_ATNum = 0.25;
		PF_ATNum = -0.5;
	} else if (EF_PATTERN == 'EF-HI' && PF_PATTERN == 'PF-SUI') {
		EF_ATNum = 1;
		PF_ATNum = 1.25 + (0.5 * PF_S5);
	} else if (EF_PATTERN == 'EF-DO' && PF_PATTERN == 'PF-SUI') {
		EF_ATNum = 1.25 + (0.5 * EF_S4);
		PF_ATNum = 1;
	} else if (EF_PATTERN == 'EF-KIN' && PF_PATTERN == 'PF-SUI') {
		EF_ATNum = -0.5;
		PF_ATNum = 0.25;
	} else if (EF_PATTERN == 'EF-SUI' && PF_PATTERN == 'PF-SUI') {
		EF_ATNum = 1;
		PF_ATNum = 1;
	} else {
		EF_ATNum = 1;
		PF_ATNum = 1;
	}

	if(PF_PATTERN == 'PF-' + playerType){
		PF_ATNum = PF_ATNum * 1.05;
	}

	if(EF_PATTERN == 'PF-' + enemyType){
		EF_ATNum = EF_ATNum * 1.05;
	}

	jc.layer('F_L_E1').fadeOut(2000, function() {
		jc('#kanji01').color(EK_COLOR);
		jc('#kanjiText01').color('rgba(255,255,255)');
		jc.layer('F_L_E1').fadeIn(2000, function() {
			jc(EK_TYPE).fadeIn(500,function(){
				EF_END = 'END';
			});
		});
	});
	jc.layer('F_L_E2').fadeOut(2000, function() {
		jc('#kanji02').color(EK_COLOR);
		jc('#kanjiText02').color('rgba(255,255,255)');
		jc.layer('F_L_E2').fadeIn(2000);
	});
	jc.layer('F_L_E3').fadeOut(2000, function() {
		jc('#kanji03').color(EK_COLOR);
		jc('#kanjiText03').color('rgba(255,255,255)');
		jc.layer('F_L_E3').fadeIn(2000);
	});

	jc.layer('F_L_P1').fadeOut(2000, function() {
		jc('#kanji04').color(PK_COLOR);
		jc('#kanjiText04').color('rgba(255,255,255)');
		jc.layer('F_L_P1').fadeIn(2000, function() {
			jc(PK_TYPE).fadeIn(500,function(){
				PF_END = 'END';
			});
		});
	});
	jc.layer('F_L_P2').fadeOut(2000, function() {
		jc('#kanji05').color(PK_COLOR);
		jc('#kanjiText05').color('rgba(255,255,255)');
		jc.layer('F_L_P2').fadeIn(2000);
	});
	jc.layer('F_L_P3').fadeOut(2000, function() {
		jc('#kanji06').color(PK_COLOR);
		jc('#kanjiText06').color('rgba(255,255,255)');
		jc.layer('F_L_P3').fadeIn(2000);
	});

	var cnt2 = 0;
	var cntPhase2 = 0;
	var getUserExp = 0;
	var getEneExp = 0;
	var effectFlg = 0;

	interval_5 = setInterval(function() {
		if (effectFlg == 0) {
			if (EF_END == 'END' && PF_END == 'END') {
				effectFlg = 1;
				jc.layer('F_L_E7').objects().level('top');
				jc.layer('F_L_E7').objects().visible(true);
				jc('#label03').level('top');
				jc('#label03').visible(true);

				jc('#BEfect01').translate(-50,20,200,function(){this.translate(-50,-20,200,function(){this.translate(50,20,200,function(){this.translate(50,-20,200,function(){this.visible(false);});});});});

				jc('#BEfect02').translate(-75,0,200,function(){this.translate(50,0,200,function(){this.translate(-50,0,200,function(){this.translate(75,0,200,function(){this.visible(false);});});});});

				jc('#BEfect03').translate(-50,-20,200,function(){this.translate(-50,20,200,function(){this.translate(50,-20,200,function(){this.translate(50,20,200,function(){this.visible(false);});});});});

				jc('#BEfect04').translate(50,20,200,function(){this.translate(50,-20,200,function(){this.translate(-50,20,200,function(){this.translate(-50,-20,200,function(){this.visible(false); AT_END = 'END';});});});});

				jc('#BEfect05').translate(75,0,200,function(){this.translate(-50,0,200,function(){this.translate(50,0,200,function(){this.translate(-75,0,200,function(){this.visible(false);});});});});

				jc('#BEfect06').translate(50,-20,200,function(){this.translate(50,20,200,function(){this.translate(-50,-20,200,function(){this.translate(-50,20,200,function(){this.visible(false);});});});});
			}
		}
	}, 100);

	interval_2 = setInterval(function() {

		if (AT_END == 'END') {

			var wkEBP = parseInt(enemyBarPoint);
			EDmg = Math.round(playerAttackPoint * PF_ATNum * PF_RandomPT);
			if (wkEBP - EDmg > 0) {
				enemyBarPoint = wkEBP - EDmg;
			} else {
				enemyBarPoint = 0;
			}
			EDmg = EDmg * -1;

			var wkPBP = parseInt(playerBarPoint);
			PDmg = Math.round(enemyAttackPoint * EF_ATNum * EF_RandomPT);
			if (wkPBP - PDmg > 0) {
				playerBarPoint = wkPBP - PDmg;
			} else {
				playerBarPoint = 0;
			}
			PDmg = PDmg * -1;

			if (enemyBarPoint == 0 && playerBarPoint == 0) {
				enemyComment = '互角ということか';
				battleResult = 'P-EVEN';
				getUserExp = Math.round(enemyBarPointBefore * 0.1) + 1;
				getEneExp = Math.round(playerBarPointBefore * 0.1) + 1;
			} else if (enemyBarPoint == 0) {
				enemyComment = 'く、、、負けた！';
				battleResult = 'P-WIN';
				getUserExp = Math.round(enemyBarPointBefore * 0.3) + 1;
				getEneExp = Math.round(enemyBarPointBefore * 0.05) + 1;
			} else if (playerBarPoint == 0) {
				enemyComment = 'まだまだ若いな';
				battleResult = 'P-LOSE';
				getUserExp = Math.round(playerBarPointBefore * 0.05) + 1;
				getEneExp = Math.round(playerBarPointBefore * 0.3) + 1;
			} else if (playerBarPoint == enemyBarPoint) {
				enemyComment = 'なかなかやるな！';
			} else if (playerBarPoint > enemyBarPoint) {
				enemyComment = 'なんだと！？';
			} else if (playerBarPoint < enemyBarPoint) {
				enemyComment = 'ふふふ、そんなものか？';
			}

			if(battleResult != ''){
				if(fieldType == '1' || fieldType == '2' || fieldType == '3'){
					var FD_1d = new Date();
					$.getJSON('../main/mdSchoolTrnmntResult' + '?_=' + FD_1d.getMilliseconds(), {
						userId : userId,
						fieldType : fieldType,
						battleResult : battleResult
					}, "json");
				} else {
					var FD_2d = new Date();
					$.getJSON('../main/mdFieldResult' + '?_=' + FD_2d.getMilliseconds(), {
						userId : userId,
						eneId : eneId,
						getUserExp : getUserExp,
						getEneExp : getEneExp,
						battleResult : battleResult
					}, "json");
				}
			}
			clearInterval(interval_2);
			attackEnd(idCanvas,getUserExp);
		}
	}, 500);
}
function firstView(idCanvas) {
	var TxtFont5 = 'bold 14px  "Meiryo", "MS PGothic", "ヒラギノ角ゴ Pro W3", "Osaka", "Verdana", "arial", "sans-serif"';

	if(imageLoadCnt >= 5){
		imageLoadCnt = 0;
		jc.layer('F_L_11').objects().opacity(0);
		jc.layer('F_L_7').objects().visible(false);
		clearInterval(interval_3);
		if (firstLogin == '3') {
			// 詳細パネル描画
			jc.line([ [ 80, 170 ], [ 80, 150 ], [ 100, 170 ] ], 'rgba(0,255,0,1)', 1).layer('L_FD');
			jc.rect(20, 170, 250, 90, 'rgba(0,255,0)', 1).id('FD_DISP').layer('L_FD');
			jc.text("対戦室にようこそ", 140, 190, 'rgb(0,0,0)').id("FD_dt1").font(TxtFont5).align('center').opacity(1).layer('L_FD');
			jc.text("まずは私と試しに対戦してみよう！", 140, 210, 'rgb(0,0,0)').id("FD_dt2").font(TxtFont5).align('center').opacity(1).layer('L_FD');
			jc.text("対戦開始ボタンを押して開始だ", 140, 230, 'rgb(0,0,0)').id("FD_dt3").align('center').font(TxtFont5).opacity(1).layer('L_FD');
			jc.text("私の体力をゼロにしたら勝ちだよ", 140, 250, 'rgb(0,0,0)').id("FD_dt3").align('center').font(TxtFont5).opacity(1).layer('L_FD');
			jc.layer('L_FD').objects().level('top');

			jc.layer('L_FD').objects().click(function() {
				jc.layer('L_FD').objects().opacity(0);
			});
			setTimeout(FieldHideDisp, 6000 );
		}
	}
}
function FieldHideDisp() {
	jc.layer('L_FD').objects().fadeOut(1000);
}
function attackEnd(idCanvas,expTxt) {

	var TxtFont5 = 'bold 14px  "Meiryo", "MS PGothic", "ヒラギノ角ゴ Pro W3", "Osaka", "Verdana", "arial", "sans-serif"';

	jc.layer('F_L_11').objects().opacity(0);
	jc('#label03').visible(false);

	var nextLvExpTxt = 0;

	var EDmgTxt = '0';
	if (EDmg > 0) {
		EDmgTxt = '+' + EDmg;
		jc('#labelEDmg').color('rgb(0,0,255)');
	} else {
		EDmgTxt = EDmg;
		jc('#labelEDmg').color('rgb(255,255,255)');
	}

	jc('#labelEDmg').string(EDmgTxt);

	var PDmgTxt = '0';
	if (PDmg > 0) {
		PDmgTxt = '+' + PDmg;
		jc('#labelPDmg').color('rgb(0,0,255)');
	} else {
		PDmgTxt = PDmg;
		jc('#labelPDmg').color('rgb(255,255,255)');
	}

	jc('#labelPDmg').string(PDmgTxt);

	jc.layer('F_L_8').objects().opacity(1);
	jc.layer('F_L_8').objects().translate(0, 50, 2000, {
		type : 'inOut',
		fn : 'elastic',
		n : 1.5
	}, function() {
		this.fadeOut(1000, function() {
			jc.layer('F_L_8').objects().translate(0, -25);
		});
	});

	// 戦闘結果ラベル表示
	if (battleResult != '') {
//		jc.layer('F_L_10').objects().visible(false);
		if (battleResult == 'P-EVEN') {
			jc('#labelEven').visible(true);
		} else if (battleResult == 'P-WIN') {
			jc.layer('F_L_10W').objects().visible(true);
		} else if (battleResult == 'P-LOSE') {
			jc.layer('F_L_10L').objects().visible(true);
		}
		jc.layer('F_L_BtnA').objects().visible(false);
		jc.layer('F_L_BtnC').objects().visible(false);

		jc.rect(20, 220, 250, 50, 'rgba(0,255,0)', 0.8).id('FD_RSLT').layer('L_FD_RSLT');

		if(fieldType == '1' || fieldType == '2' || fieldType == '3'){
			if (battleResult == 'P-WIN') {
				if(fieldType == '1'){
					jc.text('属性代表の資格を得ました！', 145, 240, 'rgb(0,0,0)').id('FD_Rslt1').font(TxtFont5).align('center').opacity(1).layer('L_FD_RSLT');
				} else if(fieldType == '2'){
					jc.text('攻撃力代表の資格を得ました！', 145, 240, 'rgb(0,0,0)').id('FD_Rslt1').font(TxtFont5).align('center').opacity(1).layer('L_FD_RSLT');
				} else if(fieldType == '3'){
					jc.text('５人抜きの資格を得ました！', 145, 240, 'rgb(0,0,0)').id('FD_Rslt1').font(TxtFont5).align('center').opacity(1).layer('L_FD_RSLT');
				}
			} else {
				jc.text('残念！また挑戦してください', 145, 240, 'rgb(0,0,0)').id('FD_Rslt1').font(TxtFont5).align('center').opacity(1).layer('L_FD_RSLT');
			}
		} else {
			nextLvExpTxt = userNextLvExp - expTxt;

			jc.text('経験値：' + expTxt + 'を得ました！', 145, 240, 'rgb(0,0,0)').id('FD_Rslt1').font(TxtFont5).align('center').opacity(1).layer('L_FD_RSLT');

			if(nextLvExpTxt <= 0){
				jc('#FD_RSLT').attr('color','rgba(255,204,0)');
				jc.text("レベルアップしました！", 145, 260, 'rgb(255,0,0)').id('FD_Rslt2').font(TxtFont5).align('center').opacity(1).layer('L_FD_RSLT');
			} else {
				jc('#FD_RSLT').attr('color','rgba(0,255,0)');
				jc.text("次のレベルまであと" + nextLvExpTxt + "です。", 145, 260, 'rgb(0,0,0)').id('FD_Rslt2').font(TxtFont5).align('center').opacity(1).layer('L_FD_RSLT');
			}

			userNextLvExp = userNextLvExp - expTxt;
		}

		battleResult = '';
	} else {
		enableSw = true;
	}

	jc('#F_EP').string(enemyBarPoint);
	jc('#F_PP').string(playerBarPoint);

	jc('#kanji01').color('rgba(255,255,100)');
	jc('#kanji02').color('rgba(255,255,100)');
	jc('#kanji03').color('rgba(255,255,100)');
	jc('#kanji04').color('rgba(255,255,100)');
	jc('#kanji05').color('rgba(255,255,100)');
	jc('#kanji06').color('rgba(255,255,100)');
	jc('#kanjiText01').color('rgba(0,0,0)');
	jc('#kanjiText02').color('rgba(0,0,0)');
	jc('#kanjiText03').color('rgba(0,0,0)');
	jc('#kanjiText04').color('rgba(0,0,0)');
	jc('#kanjiText05').color('rgba(0,0,0)');
	jc('#kanjiText06').color('rgba(0,0,0)');

	jc.start(idCanvas, true);
}
